//
//  ShareCookieViewController.m
//  WKWebViewDemo
//
//  Created by migu-hfy on 16/3/29.
//  Copyright © 2016年 migu-hfy. All rights reserved.
//

#import "ShareCookieViewController.h"
#import <WebKit/WebKit.h>
@interface ShareCookieViewController ()

@property (nonatomic, strong) WKProcessPool *processPool;
@end

@implementation ShareCookieViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //共用同一个WKProcessPool
    
    _processPool = [[WKProcessPool alloc] init];
    
    WKWebViewConfiguration *configuration1 = [[WKWebViewConfiguration alloc] init];
    configuration1.processPool = self.processPool;
    WKWebView *webView1 = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration1];
    [self.view addSubview:webView1];
    
    WKWebViewConfiguration *configuration2 = [[WKWebViewConfiguration alloc] init];
    configuration2.processPool = self.processPool;
    WKWebView *webView2 = [[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration2];
    [self.view addSubview:webView2];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
